package com.obast.charer.common.enums;

/**
 * @author ：tfd
 * 异常枚举类
 */
public enum ErrCode implements IEnum {
    /**
     * 系统通用异常段
     */
    PARAMS_EXCEPTION(10000001, "参数异常"),
    SYSTEM_EXCEPTION(10000002, "系统异常"),
    UNKNOWN_EXCEPTION(10000003, "未知异常"),

    PARSE_JSON_EXCEPTION(10000003, "解析JSON异常"),
    SYSTEM_ERROR(10000004, "服务器内部错误"),

    METHOD_NOT_ALLOWED(10000005, "请求方法不支持"),
    NOT_FOUND(10000006, "请求资源不存在"),
    FORBIDDEN(10000007, "请求被拒绝"),
    UNAUTHORIZED_EXCEPTION(10000008, "未授权访问"),
    UNSUPPORTED_OPERATION_EXCEPTION(10000009, "方法未实现"),
    DATA_NOT_EXIST(10000010, "数据不存在"),

    /**
     * openapi通用异常段
     */
    IDENTIFIER_ERROR(20000000, "签名验证失败"),

    API_LOGIN_ERROR(20000000, "登录验证失败"),


    /**
     * 组件通用异常段
     */
    GET_COMPONENT_INSTANCE_ERROR(30000001, "获取通讯组件实例失败"),
    GET_COMPONENT_SCRIPT_ERROR(30000002, "获取通讯组件脚本失败"),
    GET_CONVERT_ERROR(30000003, "获取转换器失败"),
    GET_SPI_COMPONENT_ERROR(30000004, "获取组件CLASS失败"),
    GET_SPI_CONVERT_ERROR(30000005, "获取转换器CLASS失败"),
    COMPONENT_NOT_FOUND(30000006, "通讯组件不存在"),
    SEND_DESTINATION_NOT_FOUND(30000007, "发送目标不存在"),
    MSG_CONVERT_ERROR(30000008, "消息转换失败"),
    DEVICE_REGISTER_ERROR(30000009, "设备注册失败"),
    COMPONENT_ID_BLANK(30000010, "通讯组件ID为空"),
    COMPONENT_JAR_NOT_FOUND(30000011, "通讯组件JAR包为空"),
    COMPONENT_ALREADY(30000012, "通讯组件已经存在"),
    SAVE_COMPONENT_SCRIPT_ERROR(30000013, "保存通讯组件脚本失败"),
    SAVE_CONVERT_SCRIPT_ERROR(30000014, "保存转换器脚本失败"),
    ADD_COMPONENT_ERROR(30000015, "添加通讯组件失败"),
    ADD_CONVERT_ERROR(30000016, "添加转换器失败"),
    CONVERT_NOT_FOUND(30000017, "转换器不存在"),
    DELETE_CONVERT_ERROR(30000018, "删除转换器失败"),
    DELETE_COMPONENT_ERROR(30000019, "删除通讯组件失败"),
    PRODUCT_SECRET_ERROR(30000020, "产品密钥错误"),
    COMPONENT_START_ERROR(30000021, "通讯组件启动失败"),
    INIT_PRODUCER_ERROR(30000022, "初始化MQ生产者失败"),
    SEND_MSG_ERROR(30000023, "发送消息失败"),



    PLUGIN_ROUTER_NOT_FOUND(30000100, "未找到插件路由"),
    PLUGIN_INSTANCE_NOT_FOUND(30000101, "插件实例未找到"),
    PLUGIN_SERVICE_NOT_FOUND(30000102, "插件设备服务未找到"),
    PLUGIN_INSTALL_FAILED(30000103, "插件安装失败"),
    PLUGIN_PARSE_MESSAGE_EXCEPTION(30000200, "插件解析消息异常"),
    PLUGIN_UNSUPPORTED_DIRECTIVE__EXCEPTION(30000004, "不支持的设备指令"),

    DEVICE_ACTION_FAILED(30000200, "设备动作执行失败"),


    /**
     * 大屏通用异常段
     */
    RESOURCE_FILE_NOT_FOUND(40000000, "资源包为空"),
    BIG_SCREEN_NOT_FOUND(40000001, "大屏不存在"),
    BIG_SCREEN_ALREADY(40000002, "大屏已存在"),
    ADD_BIG_SCREEN_ERROR(40000003, "保存大屏失败"),
    DELETE_BIG_SCREEN_ERROR(40000004, "删除大屏资源失败"),
    SCREEN_API_NOT_FOUND(40000005, "大屏接口不存在"),
    ADD_SCREEN_API_ERROR(40000006, "添加大屏接口失败"),
    SCREEN_PUBLISH_ERROR(40000007, "大屏发布失败"),
    API_LIST_BLANK(40000008, "接口列表为空"),

    /**
     * 业务通用异常段
     */
    ID_BLANK(50000001, "ID为空"),
    TASK_NOT_SUPPORT_RENEW(50000002, "任务不支持续订"),
    GROUP_ALREADY(50000003, "分组已经存在"),
    GROUP_NOT_FOUND(50000004, "分组不存在"),
    PRODUCT_NOT_FOUND(50000005, "产品不存在"),
    DEVICE_NOT_FOUND(50000006, "设备不存在"),
    DEVICE_NOT_ENABLED(50000007, "设备未启用"),
    DEVICE_NOT_GUN_FOUND(50000008, "充电枪号不存在"),
    DEVICE_OFFLINE(50000009, "设备已离线"),
    DEVICE_ALREADY(50000010, "设备已存在"),

    DEVICE_AUTH_NULL(50000020, "设备用户名或密码为空"),
    DEVICE_AUTH_INVALID(50000021, "设备用户名或密码错误"),


    //国家代码
    SYS_COUNTRY_NOT_FOUND(50001000, "国家未找到"),







    /*充电桩*/
    CHARGER_NOT_FOUND(50000006, "设备不存在"),
    CHARGER_DN_ALREADY(50000009, "设备DN已存在"),
    CHARGER_STATE_OFFLINE(50030001, "设备已离线"),
    CHARGER_STATE_BUSY(50030002, "设备使用中"),
    CHARGER_STATE_FAIL(50030003, "设备故障"),
    CHARGER_STATE_UNKNOWN(50030004, "设备状态未知"),
    CHARGER_STATE_IDLE(50030005, "设备空闲"),
    CHARGER_START_FAIL(62000002, "充电桩启动失败"),
    CHARGER_STOP_FAIL(62000003, "充电桩停止失败"),

    CHARGER_UNRECOGNIZED_CHARGER_ACTION(6200004, "未识别的充电桩指令"),
    CHARGER_DN_INVALID(6200005, "充电桩DN错误"),





    //充电桩指令
    CHARGER_DIRECTIVE_NOT_FOUND(62000001, "设备指令不存在"),
    CHARGER_DIRECTIVE_NOT_UNIQUE(62000002, "设备指令不唯一"),

    CHARGER_DIRECTIVE_EXECUTE_FAIL(62000003, "设备指令执行失败"),

    //充电枪
    CHARGER_GUN_NOT_FOUND(62000001, "充电枪信息不存在"),
    CHARGER_GUN_NOT_SLOT(62000001, "充电枪未连接"),

    CHARGER_GUN_STATE_ERROR(62000001, "充电枪状态错误"),


    //桩号管理
    CHARGER_STORAGE_NOT_FOUND(62000100, "桩号不存在"),
    CHARGER_STORAGE_QTY_INVALID(62000101, "生成桩号数量不正确"),
    CHARGER_STORAGE_IDS_EMPTY(62000102, "未选择桩号"),

    //充电桩扫描,




    //车位相机
    DCAM_NOT_FOUND(62010001, "车位相机不存在"),
    DCAM_NOT_BIND_STATION(62010005, "车位相机未绑定场站"),

    DCAM_PARKING_NAME_NOT_SET(62010009, "车位相机未定义车位名称"),
    DCAM_PARKING_PARKING_NOT_BIND(62010010, "车位相机车位未绑定场地车位"),
    DCAM_PARKING_NAME_EMPTY(62010010, "车位名称为空"),
    DCAM_PARKING_PARKING_ID_EMPTY(62010011, "车位不能为空"),
    DCAM_PARKING_DCAM_ID_EMPTY(62010012, "车位相机为空"),
    DCAM_PARKING_NAME_ALREADY(62010013, "车位相机定义的车位名称已经存在"),



    //产品
    PRODUCT_UNRECOGNIZED_PRODUCT_TYPE(62001000, "未识别的产品类型"),
    PRODUCT_PROPERTIES_NOT_FOUND(50000014, "产品属性不存在"),
    PRODUCT_PROPERTIES_PROTOCOL_NOT_CONFIG(50000015, "产品协议未设置"),
    PRODUCT_PROPERTIES_CHARGER_GUN_QTY_NOT_SETTING(50000015, "充电桩产品枪数量未设置"),
    PRODUCT_PROPERTIES_LOW_BALANCE_NOT_SETTING(50000015, "充电桩产品最低余额未设置"),




    //协议
    PROTOCOL_NOT_FOUND(50001000, "协议不存在"),
    PROTOCOL_DN_LENGTH_INVALID(50001001, "协议未定义DN长度"),


    FILE_NOT_FOUND(50000014, "文件不存在"),
    RULE_NOT_FOUND(50000015, "规则不存在"),
    RULE_ALREADY_RUNNING(50000016, "规则已运行"),
    SEND_REQUEST_ERROR(50000017, "发送请求失败"),
    TASK_NOT_FOUND(50000018, "任务不存在"),
    RENEW_TASK_ERROR(50000019, "重启任务失败"),
    HOME_NOT_FOUND(50000020, "家庭不存在"),
    CURRENT_HOME_NOT_FOUND(50000021, "当前家庭不存在"),
    SPACE_NOT_FOUND(50000022, "空间不存在"),
    SPACE_DEVICE_NOT_FOUND(50000023, "空间设备不存在"),
    DATA_BLANK(50000024, "数据为空"),
    DATA_LENGTH_ERROR(50000025, "数据长度错误"),
    DATA_FORMAT_ERROR(50000026, "数据格式错误"),
    USER_NOT_FOUND(50000027, "用户不存在"),
    RESET_PWD_ERROR(50000028, "重置密码失败"),
    UPDATE_PWD_ERROR(50000029, "修改密码失败"),
    PWD_ERROR(50000030, "密码错误"),
    STATE_ERROR(50000031, "状态错误"),
    RECORD_NOT_FOUND(50000032, "记录不存在"),
    ADD_PLATFORM_USER_ERROR(50000033, "添加平台用户失败"),
    UPLOAD_FILE_ERROR(50000034, "上传文件失败"),
    FILE_NAME_IS_NULL(50000035, "文件名为空，获取文件名失败"),
    PRODUCT_KEY_EXIST(50000036, "ProductKey已存在"),
    DATA_ALREADY(50000037, "记录已存在"),
    TEMPLATE_NAME_ALREADY(50000038, "模版名称已存在"),
    RELATED_PRODUCTS_EXIST(50000039, "存在关联产品"),

 /****************************运营商********************************************/
    TENANT_NOT_FOUND(50001001, "运营商不存在"),
    TENANT_DISABLE(50001002, "运营商已禁用"),
    TENANT_EXPIRE(50001003, "运营商已过期"),
    TENANT_UNAUTHORIZED(50001004, "不允许操作主运营商"),

    TENANT_DELETE_EXIST_AGENT(50001005, "运营商存在未删除的代理商，请先删除代理商"),

    TENANT_USERNAME_ALREADY_USED(50001006, "运营商用户名已经存在"),
    TENANT_COMPANY_NAME_ALREADY_USED(50001007, "运营商名称已经存在"),
    TENANT_PROFIT_PERCENT_INVALID(50001008, "运营商分润比例设置错误"),

    //租户套餐
    TENANT_PACKAGE_NOT_FOUND(50002000, "套餐不存在"),
    TENANT_PACKAGE__EXISTS_TENANT(50002001, "套餐存在租户"),


    //Oss Config
    OSS_CONFIG_NOT_FOUND(60000100, "Oss配置不存在"),
    OSS_CONFIG_UNAUTHORIZED(60000100, "系统内置, 不可删除!"),

    /**
     *  计价规则
     */
    PRICE_NAME_ALREADY(60001000, "计价规则名称已存在"),
    PRICE_NOT_FOUND(60001002, "计价规则不存在"),
    PRICE_EXCEPTION(60001003, "计价规则异常"),

    PRICE_EXISTS_CHARGER(60001003, "计价规则存在已经应用的设备"),

    //计价规则验证
    PRICE_VALIDATE_TYPE_EMPTY(60002000, "计价规则类型不能为空"),
    PRICE_VALIDATE_PROPERTIES_EMPTY(60002001, "计价规则属性不能为空"),
    PRICE_VALIDATE_PROPERTIES_FEE_EMPTY(60002002, "计价规则价格项不能为空"),

    PRICE_PROPERTIES_EXCEPTION(60002003, "计价规则属性异常"),
    PRICE_PROPERTIES_PERIOD_EMPTY(60002003,"计价规则分时计价周期不能为空"),
    PRICE_STANDARD_PROPERTIES_FEE_EMPTY(60002004,"计价规则标准计价价格项目不能为空"),
    PRICE_STANDARD_PROPERTIES_ELEC_FEE_EMPTY(60002005,"计价规则标准计价电价不能为空"),
    PRICE_STANDARD_PROPERTIES_SERVICE_FEE_EMPTY(60002005,"计价规则标准计价服务费不能为空"),
    PRICE_TOU_PROPERTIES_FEE_QTY_INVALID(60002006,"计价规则分时计价价格数量不正确"),
    PRICE_TOU_PROPERTIES_ELEC_FEE_EMPTY(60002007,"计价规则分时计价电价不能为空"),
    PRICE_TOU_PROPERTIES_SERVICE_FEE_EMPTY(60002008,"计价规则分时计价服务费不能为空"),
    PRICE_TOU_PROPERTIES_PERIOD_EMPTY(60002009,"计价规则分时计价时间周期为空"),
    PRICE_TOU_PROPERTIES_PERIOD_QTY_INVALID(60002010,"计价规则分时计价时间周期数量不正确"),
    PRICE_TOU_PROPERTIES_PERIOD_LABEL_EMPTY(60002011,"计价规则分时计价时间周期标题为空"),
    PRICE_TOU_PROPERTIES_PERIOD_INDEX_EMPTY(60002012,"计价规则分时计价时间周期未设置价格"),


    //占位计价规则

    PRICE_PARK_NOT_FOUND(60003001,"占位计费规则不存在"),
    PRICE_PARK_EXISTS_DCAM(60003002,"存在已经应用的设备"),


    //占位记录
    PARK_NOT_FOUND(60004001,"占位记录不存在"),
    PARK_STATE_ERROR(60004002,"占位记录状态错误"),
    PARK_IN_TIME_EMPTY(60004003,"占位记录入场时间为空"),
    PARK_OUT_TIME_EMPTY(60004004,"占位记录出场时间为空"),





    INVOKE_UNSUPPORTED_EXCEPTION(62500001, "不支持的指令"),

    //订单
    ORDER_NOT_FOUND(62600001, "订单不存在"),
    ORDER_STATE_ERROR(62600002, "订单状态错误"),
    ORDER_DEAL_ERROR(62600003, "订单分成状态错误"),
    ORDER_NOT_REQUIRE_DEBIT(62600004, "订单没有欠款"),
    ORDER_START_TIME_EMPTY(62600010, "订单开始充电时间为空"),
    ORDER_END_TIME_EMPTY(62600011, "订单结束充电时间为空"),

    ORDER_CHARGE_PAY_TYPE_NULL(62600012, "订单充电支付类型为空"),
    ORDER_CHARGE_START_TYPE_NULL(62600013, "订单充电启动方式为空"),
    ORDER_CHARGE_STOP_TYPE_NULL(62600014, "订单充电停止方式为空"),

    INSTANT_NOT_FOUND(62601000, "即充即退记录不存在"),
    INSTANT_NOT_PAID(62601001, "即充即退未充值"),
    INSTANT_BALANCE_NOT_ENOUGH(62601002, "即充即退余额不足"),

    //停车记录
    PARK_IN_RECORD_NOT_FOUND(62610001, "未找到入场记录"),

    //场站
    STATION_NOT_FOUND(62600001, "场站不存在"),
    STATION_NOT_ENABLED(62600002, "场站未启用"),
    STATION_EXISTS_CHARGER(62600003, "场站已经存在设备"),



    //车位
    PARKING_NOT_FOUND(62700001, "车位不存在"),
    PARKING_EMPTY(62700501, "车位信息为空"),
    PARKING_STATION_EMPTY(62700502, "场站不能为空"),
    PARKING_NO_EMPTY(62700503, "场站编号不能为空"),
    PARKING_NO_ALREADY(62700504, "车位编号已经存在"),

    PARKING_AlREADY_BIND_TO_CHARGER_GUN(62700505, "车位已经绑定到充电枪"),


    //优惠券
    COUPON_NAME_ALREADY(61000000, "优惠券名称已存在"),
    COUPON_NOT_FOUND(61000000, "优惠券不存在"),
    COUPON_CUSTOMER_EMPTY(61000001, "优惠券池客户为空"),
    COUPON_TRAN_ID_ALREADY(61000001, "优惠券编号已存在"),
    COUPON_AMOUNT_ERROR(61000001, "优惠券金额错误"),
    COUPON_EXPIRE_TIME_ERROR(61000001, "优惠券过期时间错误"),

    //优惠码
    COUPON_CODE_NOT_EXIST(61000001, "优惠码不存在"),
    COUPON_CODE_ALREADY_USED(61000001, "优惠码已经被使用"),
    COUPON_CODE_AMOUNT_ERROR(61000001, "优惠码金额错误"),
    COUPON_CODE_EXIST_USED(61000000, "存在已经被使用的优惠码"),

    //优惠活动
    PROMOTION_PROPERTIES_PARSE_EXCEPTION(61000001, "活动属性解析异常"),
    PROMOTION_PROPERTIES_DISCOUNT_VALUE_ERROR(61000001, "服务费打折折扣数据错误"),

    PROMOTION_NAME_ALREADY(61000001, "活动名称已经存在"),

    PROMOTION_START_TIME_EMPTY(61000001, "活动有效期起始时间为空"),

    PROMOTION_END_TIME_EMPTY(61000001, "活动有效期结束时间为空"),

    PROMOTION_RANGE_TIME_ERROR(61000001, "活动有效期结束时间不能早于开始时间"),



    DIRECTIVE_PARSE_ORDER_REPORT_EXCEPTION(80000004, "订单上报指令解析异常"),

    INVALID_OPERATE (80000004, "非法操作"),


    //客户
    CUSTOMER_NOT_FOUND(62000001, "客户信息不存在"),
    CUSTOMER_NOT_LOGIN(62000002, "客户未登陆"),

    CUSTOMER_BE_DISABLED(62000003, "客户被禁用"),

    CUSTOMER_USER_NAME_EXIST(62000003, "用户名已经存在"),
    CUSTOMER_MOBILE_EXIST(62000004, "手机号码已经存在"),

    CUSTOMER_USER_NICKNAME_EMPTY(62000005, "昵称不能为空"),


    //客户登陆
    CUSTOMER_LOGIN_NOT_FOUND(62000007, "登陆信息不存在"),



    //客户余额记录
    CUSTOMER_BALANCE_NOT_ENOUGH(62000100, "用户余额不足"),
    CUSTOMER_BALANCE_NOT_FOUND(62000102, "用户余额记录不存在"),
    CUSTOMER_BALANCE_NOT_LOCKED(62000103, "用户余额未锁定"),
    CUSTOMER_BALANCE_ALREADY_LOCKED(62000104, "用户余额记录已锁定"),
    CUSTOMER_BALANCE_QUOTA_LIST_EMPTY(62000105, "用户服务费额度为空"),
    CUSTOMER_BALANCE_QUOTA_AMOUNT_NOT_ENOUGH(62000106, "用户服务费额度不足"),
    CUSTOMER_BALANCE_QUOTA_AMOUNT_NOT_FIND(62000107, "用户服务费额度未找到"),

    //退款
    REFUND_NOT_FOUND(62000005, "退款记录不存在"),
    REFUND_STATE_ERROR(62000005, "退款记录状态错误"),

    REFUND_AMOUNT_CAN_NOT_ZERO(62000005, "退款金额不能为空"),
    REFUND_AMOUNT_CAN_NOT_GREAT_THAN_BALANCE(62000005, "退款金额不能大于余额"),

    REFUND_AMOUNT_CAN_NOT_GREAT_THAN_AVAILABLE_REFUND_AMOUNT(62000006, "退款金额不能大于可退款金额"),


    //退款 BALANCE
    REFUND_BALANCE_NOT_FOUND(62001005, "退款记录不存在"),

    //退款通知
    REFUND_WECHAT_NOTIFY_REQUEST_EXCEPTION(62002001, "微信支付退款通知请求异常"),
    REFUND_WECHAT_NOTIFY_RESPONSE_NULL(62002002, "微信支付退款通知返回为空"),
    REFUND_WECHAT_NOTIFY_PARSE_SUCCESS_TIME_EXCEPTION(62002003, "微信支付退款通知解析支付成功时间异常"),
    REFUND_WECHAT_NOTIFY_PARSE_CREATE_TIME_EXCEPTION(62002004, "微信支付退款通知解析支付建立时间异常"),
    REFUND_WECHAT_NOTIFY_PARSE_REFUND_STATUS_EXCEPTION(62002005, "微信支付退款通知解析状态异常"),

    //短信部分

    SMS_NOT_FOUND_AVAIABLE_PROVIDER(60000001, "未找到可用的短信服务商"),
    SMS_NOT_FOUND_AVAIABLE_SERVICE(60000001, "未找到短信服务"),
    SMS_PROPERTIES_PARSE_ERROR(60000001, "解析短信服务商配置信息失败"),
    SMS_SEND_RESPONSE_EMPTY(60000001, "发送短信服务器返回数据为空"),
    SMS_SEND_RESPONSE_STATUS_EMPTY(60000001, "发送短信服务器返回状态为空"),
    SMS_SEND_FAIL(60000001, "发送短信失败"),
    SMS_SEND_EXCEPTION(60000001, "发送短信异常"),

    SMS_RETRY_COUNT_EXCEEDS_LIMIT(60000001, "发送次数过多，再稍后再试"),

    //APP部分
    SYS_APP_NOT_EXSIT(80001001, "APP接口不存在"),
    SYS_APP_DISABLED(80001002, "APP接口未启用"),
    SYS_APP_CONFIG_PARSE_EXCEPTION(80001003, "APP接口配置信息解析异常"),
    SYS_APP_CONFIG_NULL(80001004, "APP接口配置信息为空"),


    //登陆
    APP_LOGIN_CUSTOMER_TYPE_EXCEPTION(80004001, "客户类型异常"),

    APP_LOGIN_USERNAME_NOT_FOUND(80004002, "用户名不存在"),

    APP_LOGIN_PASSWORD_INVALID(80004003, "密码不正确"),


    //同步用户信息
    APP_SYNC_USER_PLATFORM_NULL(80003001, "同步用户信息失败， 平台参数为空"),
    APP_SYNC_USER_CUSTOMER_LOGIN_NULL(80003002, "同步用户信息失败， 未找到登陆信息"),

    APP_SYNC_USER_CID_NULL(80003003, "同步用户信息失败， cid为空"),


    APP_SMS_RECORD_NOT_FOUND(80000001, "短信发送记录不存在"),

    APP_SMS_MESSAGE_NOT_FOUND(80000002, "短信消息为空"),
    APP_SMS_VERIFY_CODE_ERROR(80000003, "验证码错误"),
    APP_REGISTER_USER_INFO_EMPTY(80000004, "用户信息填写不完整"),

    APP_REGISTER_MOBILE_FORMAT_INVALID(80000005, "手机号码格式不正确"),


    APP_SMS_VERIFY_CODE_EXPIRED(80000002, "短信验证码已过期"),




    //推送
    PUSH_EXCEPTION(80001001, "推送异常"),
    PUSH_NOT_FOUND_AVAILABLE_PROVIDER(80001002, "未找到可用的推送服务商"),
    PUSH_NOT_FOUND_AVAILABLE_SERVICE(80001003, "未找到推送服务"),
    PUSH_SEND_FAIL(80001004, "推送发布失败"),

    //微信小程序

    WEIXIN_PARAM_EMPTY(80002001, "微信小程序返回参数为空"),

    WEIXIN_PARAM_ENCRYPTED_EMPTY(80002002, "微信小程序返回Encrypted参数为空"),
    WEIXIN_PARAM_IV_EMPTY(80002003, "微信小程序返回Iv参数为空"),

    WEIXIN_PARAM_SESSION_KEY_EMPTY(80002004, "微信小程序返回Session Key参数为空"),

    WEIXIN_PARAM_OPEN_ID_EMPTY(80002005, "微信小程序返回Open Id参数为空"),

    WEIXIN_PARSE_MOBILE_EXCEPTION(80002006, "微信小程序返回手机号异常"),


    WEIXIN_PARAM_CODE_EMPTY(80002002, "微信小程序请求码为空"),
    WEIXIN_DATA_PARSE_EXCEPTION(80002003, "微信获取数据异常"),

    //扫码
    SCAN_STATE_NOT_FOUND(80003000, "未识别扫码状态"),
    SCAN_CUSTOMER_ORDER_NOT_FOUND(80003001, "未找到客户订单"),
    SCAN_CUSTOMER_ORDER_NOT_UNIQUE(80003002, "扫码客户订单不唯一"),

    //支付方式
    PAYMENT_SERVICE_NOT_FOUND(80302001, "支付服务未找到"),
    PAYMENT_TYPE_NOT_FOUND(80302001, "支付方法未找到"),
    PAYMENT_CONFIG_NOT_FOUND(80302002, "支付配置信息未找到"),
    PAYMENT_CONFIG_PARSE_EXCEPTION(80302003, "支付配置信息解析异常"),
    PAYMENT_CONFIG_PARSE_ERROR(80302004, "支付配置信息解析失败"),
    PAYMENT_PREPAY_PARSE_ERROR(80302005, "预支付返回信息解析失败"),
    PAYMENT_PREPAY_ERROR(80302006, "预支付失败"),
    PAYMENT_QUERY_RESPONSE_PARSE_ERROR(80302007, "支付查询结果解析失败"),
    PAYMENT_QUERY_RESPONSE_PARSE_EMPTY(80302008, "支付查询结果为空"),
    PAYMENT_QUERY_RESPONSE_PACK_EXCEPTION(80302008, "支付查询结果封装异常"),


    //预支付
    PAYMENT_PREPAY_REQUEST_EXCEPTION(80303001, "预支付请求异常"),
    PAYMENT_PREPAY_REQUEST_RETURN_NULL(80303002, "预支付请求返回为空"),
    PAYMENT_PREPAY_RESPONSE_PARSE_EXCEPTION(80303003, "预支付请求返回结果解析异常"),
    PAYMENT_PREPAY_RESPONSE_PARSE_NULL(80303004, "预支付请求返回结果解析为空"),

    //预支付通知
    PAYMENT_WECHAT_NOTIFY_PARSE_EXCEPTION(80304001, "微信支付通知解析异常"),
    PAYMENT_WECHAT_NOTIFY_RESPONSE_NULL(80304002, "微信支付通知返回为空"),
    PAYMENT_WECHAT_NOTIFY_PARSE_AMOUNT_EXCEPTION(80304003, "微信支付通知解析支付金额异常"),
    PAYMENT_WECHAT_NOTIFY_PARSE_OPENID_EXCEPTION(80304004, "微信支付通知解析支付金额异常"),
    PAYMENT_WECHAT_NOTIFY_PARSE_SUCCESS_TIME_EXCEPTION(80304005, "微信支付通知解析支付成功时间异常"),
    PAYMENT_WECHAT_NOTIFY_PARSE_STATUS_EXCEPTION(80304006, "微信支付通知解析支付状态异常"),

    //退款
    REFUND_WECHAT_REQUEST_EXCEPTION(80305001, "退款请求HTTP异常"),
    REFUND_WECHAT_SERVICE_EXCEPTION(80305002, "退款请求SERVICE异常"),
    REFUND_WECHAT_MESSAGE_EXCEPTION(80305003, "退款请求MESSAGE异常"),
    REFUND_WECHAT_RESPONSE_NULL(80305004, "退款请求返回数据为空"),
    REFUND_WECHAT_PARSE_AMOUNT_EXCEPTION(80305005, "退款请求解析金额异常"),
    REFUND_WECHAT_PARSE_REFUND_STATUS_EXCEPTION(80305006, "退款请求解析状态异常"),

    REFUND_NOTIFY_EXCEPTION(80302008, "退款通知解析异常"),

    //充值方案
    RECHARGE_NOT_FOUND(80402001, "充值方案不存在"),
    RECHARGE_NAME_ALREADY(61000001, "充值方案名称已存在"),
    RECHARGE_TYPE_ERROR(61000001, "充值方案类型错误"),
    RECHARGE_ITEM_NOT_FOUND(80401001, "充值项目不存在"),

    //充值记录
    TOPUP_NOT_FOUND(80500001, "充值记录不存在"),
    TOPUP_AMOUNT_ERROR(80500002, "充值金额错误"),
    TOPUP_PAY_TYPE_NULL(80500003, "充电类型错误"),

    //系统配置
    SYS_CONFIG_BALANCE_LIMIT_ERROR(90001001, "充电最低余额设置错误"),


    SYS_USER_TYPE_ERROR(90001002, "用户类型错误"),

    //代理商
    SYS_AGENT_NOT_FOUND(90002001, "代理商不存在"),
    SYS_AGENT_STATION_NOT_FOUND(90002002, "代理商不存在"),
    SYS_AGENT_STATION_HAS_BIND(90002002, "场站已经被绑定"),



    SYS_AGENT_DEALERS_EMPTY(90002002, "合作商列表为空"),

    SYS_AGENT_DELETE_ALREADY_NOT_EMPTY(90002002, "存在未删除的合作商"),

    SYS_AGENT_DEALER_AGENT_ID_EMPTY(90002003, "代理商ID为空"),
    SYS_AGENT_DEALER_DEALER_ID_EMPTY(90002004, "合作商ID为空"),
    SYS_AGENT_DEALER_DEALER_ID_NOT_UNIQUE(90002004, "合作商已经重复"),
    SYS_AGENT_DEALER_PERCENT_EMPTY(90002004, "合作商分成比例为空"),
    SYS_AGENT_DEALER_PERCENT_INVALID(90002004, "合作商分成比例之和不能大于1"),
    SYS_AGENT_TENANT_PROFIT_PERCENT_EMPTY(90003001, "运营商分成比例为空"),
    SYS_AGENT_TENANT_PROFIT_PERCENT_INVALID(90003002, "运营商分成比例不合法"),




    //分帐
    SYS_DEAL_NOT_FOUND(90002001, "分帐组不存在"),
    SYS_DEALER_NOT_FOUND(90002002, "分帐成员不存在"),
    SYS_DEALER_EMPTY(90002002, "分帐成员为空"),
    SYS_DEALER_ALREADY_BINDING_DEAL(90002002, "分帐成员已经被分帐组绑定"),
    SYS_DEAL_EXISTS_STATION(90002003, "存在绑定的场站"),
    SYS_DEALER_PERCENT_EMPTY(90002003, "分帐成员分成比例为空"),
    SYS_DEALER_NAME_EMPTY(90002004, "分帐成员名称为空"),
    SYS_DEALER_USER_NAME_EMPTY(90002004, "分帐成员绑定用户为空"),

    SYS_DEALER_PERCENT_MUST_BE_HUNDRED(90002005, "分帐组内所有成员分成比例之和必须为100%"),


    //分成记录
    LEDGER_NOT_FOUND(90003001, "分成记录不存在"),

    //分成记录结算
    LEDGER_SELECTION_EMPTY(90003002, "请选择要结算的分成记录"),

    LEDGER_SETTLE_DEALER_NOT_FOUND(90004001, "分成结算列表不存在"),
    LEDGER_SETTLE_DEALER_STATE_ERROR(90004002, "分成结算列表状态错误"),



    //通知
    NOTIFY_CONFIG_NOT_FOUND(90004002, "通知配置信息未找到"),
    NOTIFY_NOT_BIND_CHANNEL(90004002, "通知未绑定通道"),
    NOTIFY_CHANNEL_SERVICE_NOT_FOUND(90004002, "通道服务未找到"),

    NOTIFY_TEMPLATE_NOT_FOUND(90004002, "通知模板未找到"),
    NOTIFY_TEMPLATE_CONTENT_EMPTY(90004002, "通知模板内容为空"),
    NOTIFY_TEMPLATE_CONVERT_EXCEPTION(90004002, "通知模板转换变量失败"),

    NOTIFY_SMS_SEND_FAIL(90004002, "通知短信发送失败"),




    MBANK_HEAD_NULL(90001001, "Head信息为空"),
    MBANK_BODY_NULL(90001001, "Body信息为空"),
    ;

    private final int code;
    private final String message;

    ErrCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getKey() {
        return this.code;
    }

    @Override
    public String getValue() {
        return this.message;
    }
}
